package Control;

import qwqw.ClientConsole;
import GUI.IP;
import GUI.ScreenManager;

public class IPControl {
	final public static int DEFAULT_PORT = 2222;
	private ClientConsole cc;
	private IP IPPanel;
	
	
	public IPControl(){
		IPPanel = new IP();
	}

	public IP getIPPanel(){
		return IPPanel;
	}
	public String ip_entered(){
		return IPPanel.getTextArea_ip().getText();
	}
	public boolean makeConnection(String ip){
		cc=ScreenManager.getConnection(ip, DEFAULT_PORT);
		if(cc.cclient==null){
			return false;
		}
		return true;
	
			
	}
}
